
export function dealBasicChartOptions (legend?: string[], xAxis?: string[]) {
  return {
    tooltip: {
      trigger: 'axis',
      textStyle: {
        fontSize: 12,
        color: '#000'
      }
    },
    legend: {
      data: legend,
      icon: 'diamond',
      itemGap: 30,
      top: 10,
      right: 100,
      itemWidth: 12,
      itemHeight: 6,
      textStyle: {
        color: '#4c4c4c',
        fontSize: 12,
        padding: [0, 4]
      }
    },
    grid: {
      left: 20,
      right: 20,
      bottom: 8,
      top: 40,
      containLabel: true
    },
    color: ['#20cc94', '#cc20ba', '#208acc', '#e3890f'],
    xAxis: {
      type: 'category',
      data: xAxis,
      boundaryGap: true,
      axisLine: {
        lineStyle: {
          color: '#f1f1f1'
        }
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        color: '#999',
        rotate: 40,
        fontSize: 10
      },
      splitLine: {
        show: false
      }
    },
    yAxis: {
      type: 'value',
      minInterval: 1,
      axisLine: {
        show: true,
        lineStyle: {
          color: '#f1f1f1'
        }
      },
      axisLabel: {
        color: '#999'
      },
      splitLine: {
        show: false
      }
    },
    axisPointer: {
      lineStyle: {
        color: '#99999960'
      }
    }
  }
}
